﻿using Cl.Entity.BaseEntity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cl.Entity.DataBaseEntity.User
{
    [SugarTable("User_UserApproFlowMap")]
    public class UserApproFlowMap : EntityBaseComplete
    {

        /// <summary>
        /// EntityId(对应委托订单id，以后也对应其他的订单id)
        /// </summary>
        [SugarColumn(ColumnName = "ENTITY_ID", Length = 36)]
        public string EntityId { get; set; }

        /// <summary>
        /// 审批流ID
        /// </summary>
        [SugarColumn(ColumnName = "APPROFLOW_ID", Length = 36)]
        public string ApproflowId { get; set; }

        /// <summary>
        /// 审批人ID;用户ID
        /// </summary>
        [SugarColumn(ColumnName = "USER_ID")]
        public int UserId { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        [SugarColumn(ColumnName = "APPROFLOW_TYPE", Length = 32)]
        public string ApproflowType { get; set; }

        /// <summary>
        /// 是否通过
        /// </summary>
        [SugarColumn(ColumnName = "ISPASS", Length = 1)]
        public bool Ispass { get; set; }

        /// <summary>
        /// 备注;驳回时应填写驳回原因
        /// </summary>
        [SugarColumn(ColumnName = "REMARK", Length = 255)]
        public string Remark { get; set; }

        /// <summary>
        /// 流程节点名称
        /// </summary>
        [SugarColumn(ColumnName = "FLOW_NODE")]
        public string FlowNode { get; set; }

        /// <summary>
        /// 操作时间
        /// </summary>
        [SugarColumn(ColumnName = "TIMESTAMP")]
        public DateTime Timestamp { get; set; }


        [Navigate(NavigateType.OneToOne, nameof(UserId))]
        public User? OperaUserData { get; set; }

    }
}
